//score:at least 25pts
#include<bits/stdc++.h>
#define IO(name) freopen(name".in","r",stdin),freopen(name".out","w",stdout)
using namespace std;
int n,r,s1,s2;
int main()
{
    IO("duel");
    cin>>n;
//-----------------------------------
    //to 5~10 (25pts) start
    while(n--)
    {
        cin>>r;
        if(r==1) s1++;
        else s2++;
    }
    cout<<(s1>s2?s1:s2);
    //end
//-----------------------------------
    return 0;
}
